package com.maoyu.cloud.user.repository;

import com.maoyu.cloud.mybatis.entity.PtMenuEntity;
import com.maoyu.cloud.mybatis.entity.PtUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LoginDao {
    /**
     * 根据用户名查询用户信息
     * @param username 用户名
     * @return 用户信息
     */
    PtUserEntity queryUserInfoByName(@Param("username") String username);

    /**
     * 根据用户uuid查询用户菜单信息
     * @param userUuid 用户uuid
     * @return 菜单信息
     */
    List<PtMenuEntity> queryMenuInfoListByUuidLang(@Param("userUuid") String userUuid,@Param("siteLanguage") String lang);

    /**
     * 根据用户uuid查询用户菜单信息
     * @param userUUID 用户uuid
     * @return 菜单信息
     */
    List<PtMenuEntity> queryMenuListByUserId(@Param("userUuid")String userUUID, @Param("siteLanguage") String langId);

    List<String> queryUserPermission(@Param("userUuid") String userUuid);
}
